package com.jdk18.string;

import java.util.Random;

/**
 * Created by xuyiwei on 2018/7/6.
 */
public class StringFormatTest {



    public static void main(String[] args) {
        long userId = 10;
        System.out.println(String.format("%010d",userId));

        System.out.println(String.format("%02d", (int)(Math.random()*100)));

    }
}
